class OrderGQL {

  static const String fetchCreateOder = r'''
mutation MyMutation(
  $receiverAddress: String
  $receiverName: String
  $receiverPhone: String
  $products: [OrderProductInput!] 
) {
  order {
    createMyOrder(
      input: {
        receiverAddress: $receiverAddress
        receiverName: $receiverName
        receiverPhone: $receiverPhone
        products: $products
      }
    ) {
      createTime
      id
      payTime
      payType
      realPrice
      receiverAddress
      receiverName
      status
      totalPrice
      receiverPhone
      updateTime
      userId
    }
  }
}
  ''';
  static const String fetchOrderList = r'''
query MyQuery($status: String, $limit: Int, $cursor: Int) {
  order {
    myOrders(pagination: {limit: $limit, cursor: $cursor, status: $status}) {
      hasNext
      nextCursor
      orders {
        createTime
        id
        payTime
        payType
        products {
          coverAddr
          createTime
          orderId
          id
          productId
          quantity
          title
          updateTime
        }
        realPrice
        receiverAddress
        receiverName
        receiverPhone
        status
        totalPrice
        updateTime
        userId
      }
    }
  }
}
      ''';

  static const String fetchOrderCancel = r'''
mutation MyMutation($orderId: String) {
  order {
    cancelOrder(orderId: $orderId) {
      createTime
      id
      payTime
      payType
      products {
        coverAddr
        createTime
        id
        orderId
        productId
        quantity
        title
        updateTime
      }
      realPrice
      receiverAddress
      receiverName
      receiverPhone
      status
      totalPrice
      updateTime
      userId
    }
  }
}
      ''';

  static const String fetchOrderPay = r'''
mutation MyMutation($payPassword: String, $orderId: String) {
  order {
    payOrder(orderId: $orderId, payPassword: $payPassword) {
      createTime
      id
      payTime
      payType
      products {
        coverAddr
        createTime
        id
        orderId
        productId
        quantity
        title
        updateTime
      }
      realPrice
      receiverPhone
      receiverName
      receiverAddress
      status
      totalPrice
      updateTime
      userId
    }
  }
}
        ''';

  static const String fetchOrderDelivered = r'''
mutation MyMutation($orderId: String) {
  order {
    markAsDelivered(orderId: $orderId) {
      createTime
      id
      payTime
      payType
      products {
        coverAddr
        createTime
        id
        orderId
        productId
        quantity
        title
        updateTime
      }
      realPrice
      receiverName
      receiverAddress
      receiverPhone
      status
      totalPrice
      updateTime
      userId
    }
  }
}
      ''';

  static const String fetchOrderConfirm = r'''
mutation MyMutation($orderId: String) {
  order {
    confirmReceipt(orderId: $orderId) {
      createTime
      id
      payTime
      payType
      products {
        coverAddr
        createTime
        id
        orderId
        productId
        quantity
        title
        updateTime
      }
      realPrice
      receiverAddress
      receiverName
      receiverPhone
      status
      totalPrice
      updateTime
      userId
    }
  }
}
      ''';

  static const String fetchOrderDetail = r'''
query MyQuery($orderId: String) {
  order {
    myOrderById(orderId: $orderId) {
      createTime
      id
      payTime
      payType
      products {
        coverAddr
        createTime
        id
        orderId
        productId
        quantity
        title
        updateTime
      }
      realPrice
      receiverAddress
      receiverName
      receiverPhone
      status
      totalPrice
      updateTime
      userId
    }
  }
}
      ''';
}